from flask import Blueprint, render_template, jsonify, redirect, session

from models import Course
from werkzeug.security import generate_password_hash, check_password_hash
bp = Blueprint("routes",__name__,url_prefix="/routes")

@bp.route('/courses')
def courses():
    courses = Course.query.order_by(Course.order.asc()).all()  # 添加排序
    return render_template('courses.html', courses=courses)